<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="css/bbs.css" rel="stylesheet">
    <script src="../jquery/jquery-3.4.1.min.js"></script>
    <script>
        $(function () {
            $("header span").click(function () {
                $(".post").show();
            });
            $(".btn[value=发布]").click(function () {
                $(".post").hide();
                var date = new Date();
                var date1 = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes();
                $("<li><div><img src=\"images/tou0" + Math.floor(Math.random() * 4 + 1) + ".jpg\"></div><h1>" + $(".post").children(0).prop("value") + "</h1><p><span>版块：" + $(".post select").val() + "</span><span>发表时间：" + date1 + "</span></p></li>").appendTo($(".bbs ul"));
            });
        });
    </script>
</head>
<body>
<div class="bbs">
    <header><span>我要发帖</span></header>
    <section>
        <ul></ul>
    </section>
    <div class="post">
        <input class="title" placeholder="请输入标题（1-50个字符）">
        所属版块：<select>
        <option>请选择版块</option>
        <option>电子书籍</option>
        <option>新课来了</option>
        <option>新手报到</option>
        <option>职业规划</option>
    </select>
        <textarea class="content"></textarea>
        <input class="btn" value="发布">
    </div>
</div>
</body>
</html>